# /bin/bash

for i in {1..3}; do
  # docker rm ipfs_$i && docker run -d --name ipfs_$i -v /home/fredyvia/tmp/ipfs_staging_$i:/export -v /home/fredyvia/tmp/ipfs_data_$i:/data/ipfs -p 4000$i:4001 -p 4000$i:4001/udp -p 127.0.0.1:1808$i:8080 -p 127.0.0.1:5000$i:5001 ipfs/go-ipfs:latest daemon --enable-pubsub-experiment

  docker restart ipfs_$i
  # docker exec ipfs_$i ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST","GET"]'
  # docker exec ipfs_$i ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
  # /bin/bash
  # for i in {1..3}; do
  # bash -c "cross-env PORT=300$i npm run react-start"
  # bash -c "ipfs_url=5000$i && orbitdb_directory=/home/fredyvia/tmp/client$i && web_port=300$i && electron main.js"
  # done

  # google-chrome-stable http://localhost:5000$i/webui
  # google-chrome-stable http://localhost:1808$i
done
